<%@ page language="java" import="java.util.*" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@include file="/inc/taglibs.jsp" %>
<script>
$(function(){
	var $pq=$("#protectQestion");
	for(var i=0;i<protectQestion.length;i++){
		$pq.append("<option value='"+i+"'>"+protectQestion[i]+"</option>");
	}
	initQueryForm();
});
function doevent(msg){
	showTip(msg.msg,null,1);
}
</script>
 <%--开始 --%>
   <div id="form_div" style="height:350px;">
      <form action="saveuser" onsubmit="return ajaxSubmit(this,doevent);">
      	<input type="hidden" name="id" value="${user.id }">
       	<ul>
       		<li><div class="fieldtitle">姓名:</div><div class="field"><input type="text" name="fullname"id="fullname" value="${user.fullname}"></div><div class="fieldmsg" style="display:none;">输入姓氏。</div></li>
     		<li><div class="fieldtitle">性别:</div><div class="field">
				<input type="radio" name="sex" id="sex" value="1" <c:if test="${user.sex==1 }"> checked="checked" </c:if> />男
				<input type="radio" name="sex" id="sex" value="0" <c:if test="${user.sex==0 }"> checked="checked" </c:if>  />女
			</div><div class="fieldmsg" style="display:none;"></div></li>       		<li><div class="fieldtitle">密码保护问题:</div><div class="field"><select name="protectQestion"id="protectQestion" val="${user.protectQestion }"></select></div><div class="fieldmsg">选择问题类型。</div></li>
       		<li><div class="fieldtitle">问题答案:</div><div class="field"><input type="text" name="protectAnswer"id="protectAnswer" value="${user.protectAnswer }"></div><div class="fieldmsg">输入对应的答案。</div></li>
       		<li><div class="fieldtitle">手机号码:</div><div class="field"><input type="text" name="phone"id="phone" value="${user.phone}"></div><div class="fieldmsg">输入您常用的手机号码。</div></li>
       		<li><div class="fieldtitle">Email:</div><div class="field"><input type="text" name="email"id="email" value="${user.email}"></div><div class="fieldmsg">输入您常用的电子邮箱。</div></li>
       		<li><div class="fieldtitle">长期有效:</div><div class="field">
					<select name="longtimeeffect" id="longtimeeffect">
					  <option value="0" <c:if test="${user.longtimeeffect==0 }">  selected="selected" </c:if> >否</option>
					  <option value="1" <c:if test="${user.longtimeeffect==1 }">  selected="selected" </c:if>    selected="selected" >是</option>
					</select>
				</div><div class="fieldmsg">用户是否长期有效。</div></li>
       		<li><div class="fieldtitle">有效截至时间:</div><div class="field"><input type="text" name="effecttime" id="effecttime" value="${user.effecttime}"></div><div class="fieldmsg">输入用户有效截至时间。</div></li>
       		
		<li>
		<div class="field">
			<button type="submit">&nbsp;保存&nbsp;</button>
			<button type="button" onclick="urlParameterGoPage('/userinfo/list','用户管理')">&nbsp;返回&nbsp;</button>
		</div>
		</li>
       	</ul>
       </form>
    </div>
    
    <script>
    	var effecttime = $("#effecttime").val();
    	if(effecttime!=null && effecttime!="" && effecttime.length>10)
    	{
    		$("#effecttime").val(effecttime.substring(0,10));
    	}
    </script>
    
    
<%--结束 --%>